/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package vettsspammer;

import db.server.DBServer;
import gui.components.basic.test.CRUDPanelTester;
import java.awt.Dialog;
import java.net.InetAddress;
import java.net.UnknownHostException;
import java.util.logging.Level;
import java.util.logging.Logger;
import javax.swing.JOptionPane;
import javax.swing.UIManager;
import javax.swing.UIManager.LookAndFeelInfo;
import org.apache.derby.drda.NetworkServerControl;

/**
 *
 * @author Luca
 */
public class VettsSpammer {

    public static final boolean doDB_tests = true;

    /**
     * @param args the command line arguments
     */
    public static void main(String[] args) {
        
        
        try {
            for (LookAndFeelInfo info : UIManager.getInstalledLookAndFeels()) {
                if ("Nimbus".equals(info.getName())) {
                    UIManager.setLookAndFeel(info.getClassName());
                    break;
                }
            }
        } catch (Exception e) {
            System.out.println("Nimbus look & feel not available");
        }


        System.out.println("Welcome to emp-tool project !");
        VettsCalculatorFrame frame = new VettsCalculatorFrame();
        frame.setLocationRelativeTo(null);
        frame.setTitle("Vetts Calculator");
        frame.setVisible(true);
        
        DBServer.getInstance().connect();

        if (VettsSpammer.doDB_tests) {
            CRUDPanelTester testerFrame = new CRUDPanelTester();
            testerFrame.setLocationRelativeTo(null);
            testerFrame.setVisible(true);
        }
    }

}
